use crate::lib_cgroup::cgroup_limit_mem_rm;

pub fn ns_ctrl_c() -> Result<(), String> {
    Ok(ctrlc::set_handler(move || match cgroup_limit_mem_rm() {
        Ok(_) => {}
        Err(e) => { println!("{}", e); }
    }).or(Err("error setting Ctrl-C handler".to_string()))?)
}